<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="themes01/default/clientPublic.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/codeMgr.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/tabSwitch.css" rel="stylesheet" type="text/css"/>
<link rel="StyleSheet" href="themes01/default/dtree.css" type="text/css" />
<script type="text/javascript" src="javascripts01/dtree.js"></script>
<script type="text/javascript" src="javascripts01/jquery.js"></script>
<script type="text/javascript" src="javascripts01/common.js"></script>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<div id="Holder">
<div id="MainPage">

 
 
<div id="Subnav">
 
<ul>
<?php
//定义标题
if ($_GET[type]=='1'){
$news_title='个人文件柜';
$nums=24;
$sqlnumeid=3;
}elseif($_GET[type]=='2'){
$news_title='公共文件柜';
$nums=107;
$sqlnumeid=9;
}elseif($_GET[type]=='3'){
$news_title='网络硬盘';
$nums=109;
$sqlnumeid=9;
}elseif($_GET[type]=='4'){
$news_title='下载列表';
$nums=65;
$sqlnumeid=9;
}elseif($_GET[type]=='5'){
$news_title='规章制度';
$nums=66;
$sqlnumeid=9;
}elseif($_GET[type]=='6'){
$news_title='报表中心';
$nums=110;
$sqlnumeid=9;
}else{
}
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."menu where fatherid='".$sqlnumeid."' and menutype='0' ORDER BY menunum Asc");
	while ($row = $db->fetch_array($query)) {
?>
<li><a href="<?=$row[menuurl]?>"  <? if($nums==$row[menuid]){?> id="Subnavb"<? }?>><?=$row[menuname]?></a></li>
<?php
	}
?>


</ul>
</div>
<table width="100%" height="400" border="0" align="center" cellpadding="0" cellspacing="0" style="background-color:#FDFDFD;">
  <tr>
    <td width="240" align="center" valign="top" style="padding-left:10px; padding-top:6px;">
	  <table width="230" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="7%" align="center"><img src="themes01/default/images/green_arrow.gif" width="17" height="17" /></td>
          
          <td width="64%" height="30" align="left" style="font-size:14px; font-weight:bold; color:#124164;"><?=$news_title?></td>
		  <td width="29%" align="left" style="font-size:12px;color:#124164;"><a href="javascript: a.openAll();">展开</a> | <a href="javascript: a.closeAll();">收缩</a></td>
        </tr>
      </table>

	  <div style="float:left; width:230px; background-color:#FFFFFF; border:1px solid #999999; height:375px;overflow:hidden;overflow-y:scroll;">
	  <table width="220" border="0" cellspacing="0" cellpadding="0" >
        <tr>
          <td align="left" style="padding-left:6px; padding-top:6px;"><div class="dtree">
	<script type="text/javascript">
		<!--
		a = new dTree('a');
		a.add(0,-1,'文件夹列表','#');	
		   <?php
		    if($_GET[type]=='1'){
			$wheresql=" and uid='".$_USER->id."'";
			}else{
			$wheresql='';
			}
	        $query = $db->query("SELECT * FROM ".DB_TABLEPRE."document_type where father='0' and type='".$_GET[type]."' $wheresql ORDER BY id Asc  ");
			while ($row = $db->fetch_array($query)) {
			$rsfnow = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."document_type where father='".$row[id]."' and type='".$_GET[type]."' ORDER BY id desc limit 0,1");

			?>
		   a.add(<?=$row[id]?>,0,'<?=$row[title]?>','admin.php?ac=index&fileurl=document&type=<?=$_GET[type]?>&documentid=<?=$row[id]?>');
		
		   
		   <?php 
		   //调用下级文件夹
		   if($rsfnow[id]!=''){
	       	get_document_list($row['id'],0,0);
	       }

		   ?>
		   
		   
		   
		
<?php }?>
			
		
		a.add(19,0,'查看所有文件','admin.php?ac=index&fileurl=document&type=<?=$_GET[type]?>','','','themes01/default/images/trash.gif');
		document.write(a);


		//-->
	</script>
</div></td>
        </tr>
      </table>  
</div>
</td>
    <td valign="top"><div id="MainBody">

<form name="update" method="post" action="admin.php?ac=index&fileurl=document">
  <input type="hidden" name="type" value="<?=$_GET[type]?>" />
<div id="CodeWrap">
<div id="TabSwitch">
<ul>

<li class="active"><a href="admin.php?ac=index&fileurl=document&type=<?=$_GET[type]?>"><?=$news_title?></a></li>
<li><a href="admin.php?ac=file_type&fileurl=document&type=<?=$_GET[type]?>">文件夹管理</a></li>
<li>
<img src="themes01/default/images/addicon.gif" width="10" height="10" />&nbsp;<a href="admin.php?ac=add&fileurl=document&type=<?=$_GET[type]?>">新建文件</a></li>
</ul>

 
</div>
<div id="CodeShowBlockWrap">
<div id="QueryBar">
<div id="FilterWrap">
<label for="FilterStatus"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%"><input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /><b>全选</b>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="删 除"/></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;<?=showpage($num,$pagesize,$page,$url)?></td>
  </tr>
</table>
</label>
</div>
</div>

<div id="CodeShowBlock">
<table cellpadding="0" cellspacing="0" class="data-box"><thead>
<tr class="border-in">
<th width="36"><div>选项</div></th>
<th class="title"><div>文件夹</div></th>
<th class="status"><div>文件名称</div></th>
<th class="scale"><div>附件下载</div></th>
<th class="scale"><div>发布人</div></th>
<th class="scale"><div>上传时间</div></th>
<th class="status"><div>操作</div></th>
</tr>
</thead><tbody>

<?foreach ($result as $row) {?>
<tr class="data-box-row"><td width="36" align="center">
<?php
get_checkbox_list_key("id[]",$row['id'],$row['uid'],$_USER->id)
?>
</td>

<td class="scale">
<?php
$document=explode(',',$row['documentid']);
$docid=sizeof($document)-1;
?>
<?=GET_INC_document_type_USER_NAME($document[$docid])?></td>

<td class="scale"><a href="admin.php?ac=views&fileurl=document&do=edit&id=<?=$row['id']?>&type=<?=$_GET['type']?>"><?=$row['title']?>
</a></td>
<td class="scale">
<?php if($row['annex']!=''){?>
<a href="<?=$row['annex']?>" target="_blank">下 载</a>
<?php }?>
</td>
<td class="scale"><?=GET_INC_USER_NAME($row['uid'])?></td>
<td class="scale"><?=$row['date']?></td>
<td class="scale">
<?php get_url_list_key("编辑","admin.php?ac=edit&fileurl=document&do=edit&id=".$row['id']."&type=".$_GET['type']."","".$row['uid']!=$_USER->id)?>
</td>						
</tr>
<?}?>


</tbody></table>
 
</div>
<div id="PageControl">
<div class="page-control">
<div class="border-in">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%">&nbsp;&nbsp;<input type="checkbox" class="checkbox" value="1" name="chkall" onClick="check_all(this)" /><b>全选</b>&nbsp;&nbsp;<input type="submit" name="do" id="button" value="删 除"/></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;<?=showpage($num,$pagesize,$page,$url)?></td>
  </tr>
</table>
  

</div>
</div>
</div>
</div>
</div>
 </form>
</div></td>
  </tr>
</table>


</div>
</div>
 
<script language="javascript" src="javascripts01/tangram-1.3.1.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/elf.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/union.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/codeMgr.js" type="text/javascript"></script>
 
</body>
</html>
